﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Core.Infarastructure.Structs;
using System.Reflection;
using System.IO;
using StackAttack_WindowsFormApp.Helpers;

namespace StackAttack_WindowsFormApp.DrawLogic
{
    /// <summary>
    /// Provide a logic of drawing a hero
    /// </summary>
    public class HeroCreator
    {

        /// <summary>
        /// Drawing a hero object
        /// </summary>
        /// <param name="graphics"></param>
        /// <param name="point"></param>
        public void Create(Graphics graphics, Core.Infarastructure.Structs.Point point, Image sprite = null)
        {
            if (sprite == null)
            {
                graphics.DrawImage(Image.FromFile(PathFinder.GetFullPathToFile("Images\\hero_stay.png")), point.X, point.Y);
                
            }
            else
            {
                graphics.DrawImage(sprite, point.X, point.Y);
            }
            
            
        }
    }
}
